package com.cskaoyan.tool;

import java.util.List;

public class JsonTool {
//    public static Gson gson = new Gson();
//    public static <T> List<T> jsonToList(String s){
//        gson.fromJson(s,);
//
//
//    }

    public static <T> String parseListToString(List<T> list){
        StringBuilder s = new StringBuilder();
        s.append("[\"");
        //["hb54jpg", "http1ajpg", "http1bjpg", "hte253a6pg"]
        for (T t : list) {
            s.append(t.toString());
            s.append("\"");
            s.append(", ");
        }
        s.deleteCharAt(s.length()-1);
        s.deleteCharAt(s.length()-1);
        s.append("]");
        System.out.println("s = " + s);
        return s.toString();
    }
    
}
